if(!jsx3.lang.Class.forName("tibco.admin.enterpriseAssets.userMgt.UserMgt")) {
    jsx3.require("com.gix.gui.Block")

    /**
     * User Management
     */
    jsx3.lang.Class.defineClass("tibco.admin.enterpriseAssets.userMgt.UserMgt",
            com.gix.gui.Block,
            null,
            function (usermgt) {

                usermgt.prototype.currentTab = null;

                /**
                 * instance initializer
                 * @param strName {String} unique name distinguishing this object from all other JSX GUI objects in the JSX application
                 * @param vntLeft {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntTop {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntWidth {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param vntHeight {int|String} either a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
                 * @param strHTML {String} Text/HTML markup to place in the jsx3.gui.Block instance
                 */
                usermgt.prototype.init = function(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML) {
                    //call constructor for super class (the super expects the name of the object and the function that it is an instance of)
                    this.jsxsuper(strName, vntLeft, vntTop, vntWidth, vntHeight, strHTML);
                };

                usermgt.prototype.initialize = function() {

                    this.loadTab("paneUserMgtUser_24", "tibco/admin/enterpriseAssets/userMgt/window/ui/window.xml");
                    // set the matrix
                    this.btnUser = this.getDescendantOfName("btnUser_24");
                    var me = this;
                    this.btnUser.loadTab = function(strTabName, path) {
                        me.loadTab(strTabName, path);
                    };

                    this.tabGroups = this.getDescendantOfName("btnGroups_24");
                    this.tabGroups.loadTab = function(strTabName, path) {
                        me.loadTab(strTabName, path);
                    };

                    this.btnPermissions = this.getDescendantOfName("btnPermissions_24");
                    this.btnPermissions.loadTab = function(strTabName, path) {
                        me.loadTab(strTabName, path);
                    };

                }

                usermgt.prototype.loadSubComponent = function(nodeName, path, target, fctn) {
                    var domeNode = this.getDescendantOfName(nodeName)
                    if(domeNode.getChildren().length == 0) {
                        tibco.admin.Main.loadUIResourceAsync(domeNode, "tibco.admin", path, target, fctn, true)
                    }
                    else {
                        this.currentTab = domeNode.getChild(0);
                        this.currentTab.doRefresh();
                    }
                }

                usermgt.prototype.userLoaded = function(objEvent) {
                    if(objEvent.status == "SUCCESS") {
                        this.childUser = objEvent.obj;
                        var me = this;
                        this.childUser.handler = me;
                        this.currentTab = this.childUser;
                    }
                }

                usermgt.prototype.groupLoaded = function(objEvent) {
                    if(objEvent.status == "SUCCESS") {
                        this.childGroup = objEvent.obj;
                        var me = this;
                        this.childGroup.handler = me;
                        this.currentTab = this.childGroup;
                    }
                }

                usermgt.prototype.permitLoaded = function(objEvent) {
                    if(objEvent.status == "SUCCESS") {
                        this.childPermit = objEvent.obj;
                        var me = this;
                        this.childPermit.handler = me;
                        this.currentTab = this.childPermit;
                    }
                }

                usermgt.prototype.loadTab = function(strTabName, path) {
                    var target = this;
                    var fctn = null;
                    switch(strTabName) {
                        case "paneUserMgtUser_24":
                            fctn = target.userLoaded;
                            break;
                        case "paneUserMgtGroup_24":
                            fctn = target.groupLoaded;
                            break;
                        case "paneUserMgtPermission_24":
                            fctn = target.permitLoaded;
                            break;
                    }
                    this.loadSubComponent(strTabName, path, target, fctn);
                    switch(strTabName) {
                        case "paneUserMgtUser_24":
                            this.getDescendantOfName("paneUserMgtUser_24").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true).repaint()
                            this.getDescendantOfName("paneUserMgtGroup_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            this.getDescendantOfName("paneUserMgtPermission_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            break;
                        case "paneUserMgtGroup_24":
                            this.getDescendantOfName("paneUserMgtUser_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            this.getDescendantOfName("paneUserMgtGroup_24").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true).repaint()
                            this.getDescendantOfName("paneUserMgtPermission_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            break;
                        case "paneUserMgtPermission_24":
                            this.getDescendantOfName("paneUserMgtUser_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            this.getDescendantOfName("paneUserMgtGroup_24").setDisplay(jsx3.gui.Block.DISPLAYNONE, true)
                            this.getDescendantOfName("paneUserMgtPermission_24").setDisplay(jsx3.gui.Block.DISPLAYBLOCK, true).repaint()
                            break;
                    }

                }

                usermgt.prototype.doRefresh = function() {
                    this.currentTab.doRefresh();
                }
            });

}